<?php

namespace Library\Action;
use \Library\Auth\Session;

abstract class UserAction extends \Library\Action {

	public function __construct( $params ) {
		parent::__construct( $params );
		
		if( !Session::getSession()->isAuthenticated() ) {
			$this->redirect( './Authenticate' );
		}
	}
	
	public function getUser() {
		return Session::getSession()->getUser();
	}
}
